Optimal. Leaf size=54 \[ \frac{(a+b) \log (1-\cos (e+f x))}{2 f}+\frac{(a-b) \log (\cos (e+f x)+1)}{2 f}+\frac{b \sec (e+f x)}{f} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.069843, antiderivative size = 54, normalized size of antiderivative = 1., number of steps used = 3, number of rules used = 2, integrand size = 19, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.105, Rules used = {4138, 1802} \[ \frac{(a+b) \log (1-\cos (e+f x))}{2 f}+\frac{(a-b) \log (\cos (e+f x)+1)}{2 f}+\frac{b \sec (e+f x)}{f} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 4138
Rule 1802
Rubi steps
\begin{align*} \int \cot (e+f x) \left (a+b \sec ^3(e+f x)\right ) \, dx &=-\frac{\operatorname{Subst}\left (\int \frac{b+a x^3}{x^2 \left (1-x^2\right )} \, dx,x,\cos (e+f x)\right )}{f}\\ &=-\frac{\operatorname{Subst}\left (\int \left (\frac{-a-b}{2 (-1+x)}+\frac{b}{x^2}+\frac{-a+b}{2 (1+x)}\right ) \, dx,x,\cos (e+f x)\right )}{f}\\ &=\frac{(a+b) \log (1-\cos (e+f x))}{2 f}+\frac{(a-b) \log (1+\cos (e+f x))}{2 f}+\frac{b \sec (e+f x)}{f}\\ \end{align*}
Mathematica [A] time = 0.0627475, size = 65, normalized size = 1.2 \[ \frac{a (\log (\tan (e+f x))+\log (\cos (e+f x)))}{f}+\frac{b \sec (e+f x)}{f}+\frac{b \log \left (\sin \left (\frac{1}{2} (e+f x)\right )\right )}{f}-\frac{b \log \left (\cos \left (\frac{1}{2} (e+f x)\right )\right )}{f} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.05, size = 48, normalized size = 0.9 \begin{align*}{\frac{a\ln \left ( \sin \left ( fx+e \right ) \right ) }{f}}+{\frac{b}{f\cos \left ( fx+e \right ) }}+{\frac{b\ln \left ( \csc \left ( fx+e \right ) -\cot \left ( fx+e \right ) \right ) }{f}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A] time = 0.998987, size = 61, normalized size = 1.13 \begin{align*} \frac{{\left (a - b\right )} \log \left (\cos \left (f x + e\right ) + 1\right ) +{\left (a + b\right )} \log \left (\cos \left (f x + e\right ) - 1\right ) + \frac{2 \, b}{\cos \left (f x + e\right )}}{2 \, f} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A] time = 0.513617, size = 177, normalized size = 3.28 \begin{align*} \frac{{\left (a - b\right )} \cos \left (f x + e\right ) \log \left (\frac{1}{2} \, \cos \left (f x + e\right ) + \frac{1}{2}\right ) +{\left (a + b\right )} \cos \left (f x + e\right ) \log \left (-\frac{1}{2} \, \cos \left (f x + e\right ) + \frac{1}{2}\right ) + 2 \, b}{2 \, f \cos \left (f x + e\right )} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F] time = 0., size = 0, normalized size = 0. \begin{align*} \int \left (a + b \sec ^{3}{\left (e + f x \right )}\right ) \cot{\left (e + f x \right )}\, dx \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A] time = 1.22243, size = 122, normalized size = 2.26 \begin{align*} -\frac{2 \, a \log \left (-\frac{\cos \left (f x + e\right ) - 1}{\cos \left (f x + e\right ) + 1} + 1\right ) -{\left (a + b\right )} \log \left (-\frac{\cos \left (f x + e\right ) - 1}{\cos \left (f x + e\right ) + 1}\right ) - \frac{4 \, b}{\frac{\cos \left (f x + e\right ) - 1}{\cos \left (f x + e\right ) + 1} + 1}}{2 \, f} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]